<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: ShopResource</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: ShopResource</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>ShopResource<span class="signature">()</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>The JS Buy SDK shop resource</p></div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="ShopResource"><span class="type-signature"></span>new ShopResource<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="shop-resource.js.html">shop-resource.js</a>, <a href="shop-resource.js.html#line12">line 12</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="fetchInfo"><span class="type-signature"></span>fetchInfo<span class="signature">()</span><span class="type-signature"> &rarr; {Promise|GraphModel}</span></h4>
    

    



<div class="description">
    <p>Fetches shop information (<code>currencyCode</code>, <code>description</code>, <code>moneyFormat</code>, <code>name</code>, and <code>primaryDomain</code>).
See the <a href="https://help.shopify.com/api/storefront-api/reference/object/shop">Storefront API reference</a> for more information.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="shop-resource.js.html">shop-resource.js</a>, <a href="shop-resource.js.html#line25">line 25</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A promise resolving with a <code>GraphModel</code> of the shop.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Promise</span>
|

<span class="param-type">GraphModel</span>


    </dd>
</dl>

    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>client.shop.fetchInfo().then((shop) => {
  // Do something with the shop
});</code></pre>



        
            

    

    
    <h4 class="name" id="fetchPolicies"><span class="type-signature"></span>fetchPolicies<span class="signature">()</span><span class="type-signature"> &rarr; {Promise|GraphModel}</span></h4>
    

    



<div class="description">
    <p>Fetches shop policies (privacy policy, terms of service and refund policy).</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="shop-resource.js.html">shop-resource.js</a>, <a href="shop-resource.js.html#line41">line 41</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A promise resolving with a <code>GraphModel</code> of the shop.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Promise</span>
|

<span class="param-type">GraphModel</span>


    </dd>
</dl>

    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>client.shop.fetchPolicies().then((shop) => {
  // Do something with the shop
});</code></pre>



        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="ImageHelpers.html">ImageHelpers</a></li><li><a href="ProductHelpers.html">ProductHelpers</a></li></ul><h3>Classes</h3><ul><li><a href="CheckoutResource.html">CheckoutResource</a></li><li><a href="Client.html">Client</a></li><li><a href="CollectionResource.html">CollectionResource</a></li><li><a href="Config.html">Config</a></li><li><a href="ImageResource.html">ImageResource</a></li><li><a href="ProductResource.html">ProductResource</a></li><li><a href="ShopResource.html">ShopResource</a></li></ul><h3>Global</h3><ul><li><a href="global.html#normalizeCartMoneyFieldDecimalPlaces">normalizeCartMoneyFieldDecimalPlaces</a></li><li><a href="global.html#shouldReturnWithOneDecimalPlace">shouldReturnWithOneDecimalPlace</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Wed Mar 12 2025 16:11:31 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>